import request from "../utils/request";
/**
 * 获取物资种类
 * */ 
export const getMaterialList = () => request.get("goodsdata")


/**
 * 获取物资申请记录
 * */ 
export const getSetmeal = (params:any )=>request.get("goodsapply",{params})



/**
 * 删除物资申请记录
 * */ 
export const delGoods = (id: any) => request.delete("/goodsapply/" + id)



/**
 * 获取各地疫情信息
 * */ 
export const getBannerList = () => request.get("epidemic")


// 物资预约
export interface Ivacc {
    userid?: number,
    goodsname?:string,
    date:string,
    applynum:string,
}
export const getVacc = (data: Ivacc) => request.post('/goodsapply', data)

/**
 * 疫苗预约
 * */
export interface Ivacc {
    vaname: string,
    time: string,
    type: string,
    place: string,
    // tel?: number,
}
export const setVacc = (data: Ivacc) => request.post('/vaccinemes', data)
//删除预约
export const delVacc = (id: any) => request.delete(`/vaccinemes/${id}`)
// 预约查询
export const getVaList = (data: any) => request.get(`/vaccinemes?userid=${data}`)

/**
 * 各地疫情信息排序查询
 * */
// 倒序
export const getDesc = () => request.get('/epidemic?_sort=infect&_order=desc')
// 正序
export const getAsc=()=>request.get('/epidemic?_sort=infect&_order=asc')